
<template>
	<view class="newHouse">
		<!-- 搜索 -->
		<searchTop :key='key' ></searchTop>
		<!-- 分类 -->
		
		
		<list :goodsList='goodsList'></list>
	</view>
</template>

<script>
	import banner from '@/components/swiper-dot/swiper-dot.nvue'
	import list from '@/components/listHeng.vue'
	import searchTop from '@/components/searchTop.vue'
	export default {
		components: {
			banner,
			list,
			searchTop
		},
		data() {
			return {
				key:{
					placeholder:'搜索 楼盘名/房产名/经纪人'
				},
				cateList: [{
					'image': '../../static/imgs/ic_home_menu_floor_all.png',
					'name': '全部楼盘',
					'url':'newHouse'
				}, {
					'image': '../../static/imgs/ic_home_menu_broker_big.png',
					'name': '找经纪人'
				}, {
					'image': '../../static/imgs/ic_home_menu_floor_new.png',
					'name': '最新开盘'
				}, {
					'image': '../../static/imgs/ic_home_menu_floor_on.png',
					'name': '在售楼盘'
				}, {
					'image': '../../static/imgs/ic_home_menu_calc_big.png',
					'name': '贷款计算'
				}],
				goodsList: [{
					'pid': 1,
					'defaultAlbum': '../../static/imgs/img_mine_bg_vip.png',
					'pName': 'aaa',
					'fSalePrice': '200',
					'iSales': '20'
				},{
					'pid': 1,
					'defaultAlbum': '../../static/imgs/img_mine_bg_vip.png',
					'pName': 'aaa',
					'fSalePrice': '200',
					'iSales': '20'
				},{
					'pid': 1,
					'defaultAlbum': '../../static/imgs/img_mine_bg_vip.png',
					'pName': 'aaa',
					'fSalePrice': '200',
					'iSales': '20'
				},{
					'pid': 1,
					'defaultAlbum': '../../static/imgs/img_mine_bg_vip.png',
					'pName': 'aaa',
					'fSalePrice': '200',
					'iSales': '20'
				}],
			}
		},
		methods:{
			back(){
				let pages = getCurrentPages(); // 当前页面
				 let beforePage = pages[pages.length - 2]; // 前一个页面
				 // console.log("beforePage");
				 // console.log(beforePage);
				 uni.navigateBack({
				     success: function() {
				         beforePage.onLoad(); // 执行前一个页面的onLoad方法
				     }
				 });
			}
		}
	}
	
</script>

<style scoped lang="scss">
	.newHouse{
		padding: 0 24upx;
		background: #fff;
		.top image{
			width: 21upx;
			height: 36upx;
			margin-right: 40upx;
			margin-top: 40upx;
			
			
		}
		.back{
			transform:rotate(180deg);
			-ms-transform:rotate(180deg); 	/* IE 9 */
			-moz-transform:rotate(180deg); 	/* Firefox */
			-webkit-transform:rotate(180deg); /* Safari 和 Chrome */
			-o-transform:rotate(180deg); 
			}
		
		
		.search{
			margin-top: 20upx;
			width:620upx;
			height:72upx;
			
			background:rgba(245,245,245,1);
			border-radius:12upx;
			position: relative;
			input{
				width: 80%;
				height:100%;
				font-size:24upx;
				padding: 0 30upx;
				
				color:rgba(153,153,153,1);
			}
			image{
				width:28upx;
				height:28upx;
				position: absolute;
				top: -19upx;
				right: -3%;
			}
		}
		.cate-section {
			display: flex;
			display: -webkit-flex;
			justify-content: space-between;
			flex-wrap: wrap;
			font-size: 26upx;
			padding: 20upx 0;
		}
		
		.cate-item {
			width: 20%;
			text-align: center;
			margin-top: 40upx;
			font-size: 24upx;
			color: #222;
		
		
		
		}
		
		.cate-item image {
			width: 60upx;
			height: 60upx;
		}
		.banner{
			margin: 20upx 0 60upx 0;
		}
	}
	
</style>
